package linkedlist.iterator;

import linkedlist.Node;

/**
 * @Author wangtengyu
 * @Create 2018-09-03-9:26 递归遍历链表
 */
public class RecursionIterator {

  public void iterator(Node node) {
    if (node == null) {
      return;
    }
    System.out.print(node.getData() + " ");
    iterator(node.getNext());
  }
}
